package com.qbm.association.controller;


import com.qbm.association.entity.Club;
import com.qbm.association.mapper.ClubMapper;
import com.qbm.association.service.ClubService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Aron
 * @since 2021-12-12
 */
@RestController
@RequestMapping("/association/club")
@Api(tags = "社团控制层")
@CrossOrigin
public class ClubController {
    @Autowired
    ClubMapper clubMapper;
    @Autowired
    ClubService clubService;

    @ApiOperation(value = "查询所有社团")
    @RequestMapping(value="/getClubs",method = RequestMethod.GET)
    public List<Club> getClubList(){
        return clubMapper.selectList(null);
    }
}

